package com.raccoon.ibatis.manager;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.ibatis.sqlmap.client.SqlMapException;

public interface IBatisManager {

	/**
	 * 
	 * @return
	 */
	public boolean isEnable();
	
	/**
	 * 
	 * @param enable
	 */
	public void setEnable(boolean enable);
	
	/**
	 * 
	 * @param id
	 * @param map
	 * @param paramKey
	 * @return
	 * @throws SQLException
	 */
	public Map selectAll(String id, Map map, String paramKey) throws SQLException;

	/**
	 * 
	 * @param id
	 * @return
	 * @throws SQLException
	 * @version
	 */
	public List selectAll(String id) throws SQLException;
	
	/**
	 * 
	 * @param id
	 * @param paramObject
	 * @return
	 * @throws SQLException
	 * @version
	 */
	public List selectAll(String id, Object paramObject) throws SQLException;
	
	/**
	 * 
	 * @param id
	 * @param key
	 * @return
	 * @throws SQLException
	 */
	public Object selectWithUserKey(String id, int key) throws SQLException;
	
	/**
	 * 
	 * @param id
	 * @param str
	 * @return
	 * @throws SQLException
	 */
	public List selectWithLike(String id, String str) throws SQLException;
	
	/**
	 * 
	 * @param id
	 * @param obj
	 * @return
	 * @throws SQLException
	 */
	public Object insert(String id, Object obj) throws SQLException;
	
	/**
	 * 
	 * @param id
	 * @param obj
	 * @return
	 * @throws SQLException
	 */
	public int delete(String id, Object obj) throws SQLException;
	
	/**
	 * 
	 * @param id
	 * @param obj
	 * @return
	 * @throws SQLException
	 */
	public int update(String id, Object obj) throws SQLException;
}
